<template>
  <div class="classPages">
    <van-tabs>
      <van-tab title="全部">
        <classGoods :commodities="commodities" :type=0></classGoods>
      </van-tab>
      <van-tab :key="index.id" v-for="index in category" :title="index.cname">
        <classGoods :commodities="commodities" :type="index.id"></classGoods>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
  import classGoods from "./classGoods";

  export default {
    props: ['category','commodities'],
    name: "classifications",
    components: {
      'classGoods': classGoods
    }
  }
</script>

<style scoped>

</style>
